home *** CD-ROM | disk | FTP | other *** search
-
- #ifndef _FONT_2D_
- #define _FONT_2D_
-
- //-----------------------------------
- //CUSTOMVERTEX
- //---------------------------------------
- struct CUSTOMVERTEXFONT
- {
- float x,y,z,rhw;
- D3DCOLOR color;
- FLOAT tu, tv;
- };
-
- //CUSTOMVERTEXT
- #define D3DFVF_CUSTOMVERTEXFONT (D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1)
-
- //--------------------------------------------------------------------
- // Name: Font2D Class
- // Desc: ************
- //--------------------------------------------------------------------
- class FONT2D
- {
- private:
- CUSTOMVERTEXFONT *Vertex;
- LPDIRECT3DTEXTURE9 g_pTexture;
-
- int ActVer;
- int ActChar;
-
- void PrintCharacter(float X,float Y,char Pis);
-
- public:
-
- //
- //VLASTNOSTI
- //
-
- //sirka vyska fontu
- int Width;
- int Height;
-
- //farba fontu
- COLOR Color;
-
- //
- //FUNCKIE
- //
-
- //vytvori font
- void LoadFont(char *FileName,COLOR ColorKey,int WidthChar,int HeightChar);
-
- //vytlaci text
- void Print(float X,float Y,char *Text);
-
- //vyrenderuje
- void Render();
-
- ~FONT2D();
- FONT2D();
- };
-
-
- #endif //_FONT_2D_